# user/serializer.py

from rest_framework import serializers

from user.models import UserProfile


class UserProfileSerializer(serializers.ModelSerializer):
	class Meta:
		model = UserProfile
		fields = '__all__'


class CreateUserProfileSerializer(serializers.ModelSerializer):
	class Meta:
		model = UserProfile
		fields = ('username', 'password', 'mobile')

class UpdateUserProfileSerializer(serializers.ModelSerializer):
	class Meta:
		model = UserProfile
		fields = ('id', 'mobile', 'password')


class UserProfileListSerializer(serializers.ModelSerializer):
	class Meta:
		model = UserProfile
		fields = ('id', 'username', 'gender', 'email', 'address', 'mobile', 'last_login', 'is_active', 'date_joined')